Integrand size = 27, antiderivative size = 296 \[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (9-b^2\right ) f (3+b \sin (e+f x))}+\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{\left (9-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {(b c-3 d) \operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{b \left (9-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {\left (6 b c-9 d-b^2 d\right ) \operatorname {EllipticPi}\left (\frac {2 b}{3+b},\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(3-b) b (3+b)^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
Time = 0.56 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.04, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2875, 3138, 2734, 2732, 3081, 2742, 2740, 2886, 2884} \[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{f \left (a^2-b^2\right ) (a+b \sin (e+f x))}-\frac {(b c-a d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticF}\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{b f \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {\sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{f \left (a^2-b^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (a^2 (-d)+2 a b c-b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{b f (a-b) (a+b)^2 \sqrt {c+d \sin (e+f x)}} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2875
Rule 2884
Rule 2886
Rule 3081
Rule 3138
Rubi steps \begin{align*} \text {integral}& = \frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\int \frac {\frac {1}{2} (-2 a c+b d)-a d \sin (e+f x)-\frac {1}{2} b d \sin ^2(e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{-a^2+b^2} \\ & = \frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\int \sqrt {c+d \sin (e+f x)} \, dx}{2 \left (a^2-b^2\right )}+\frac {\int \frac {\frac {1}{2} b d (a c-b d)-\frac {1}{2} b d (b c-a d) \sin (e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{b \left (a^2-b^2\right ) d} \\ & = \frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}-\frac {(b c-a d) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{2 b \left (a^2-b^2\right )}+\frac {\left (2 a b c-a^2 d-b^2 d\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{2 b \left (a^2-b^2\right )}+\frac {\sqrt {c+d \sin (e+f x)} \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{2 \left (a^2-b^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}} \\ & = \frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {\left ((b c-a d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 b \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {\left (\left (2 a b c-a^2 d-b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 b \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}} \\ & = \frac {b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {(b c-a d) \operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{b \left (a^2-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {\left (2 a b c-a^2 d-b^2 d\right ) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a-b) b (a+b)^2 f \sqrt {c+d \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 16.61 (sec) , antiderivative size = 575, normalized size of antiderivative = 1.94 \[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\frac {\frac {24 i \left ((b c-3 d) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )+3 d \operatorname {EllipticPi}\left (\frac {b (c+d)}{b c-3 d},i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )\right ) \sec (e+f x) \sqrt {-\frac {d (-1+\sin (e+f x))}{c+d}} \sqrt {-\frac {d (1+\sin (e+f x))}{c-d}}}{b (b c-3 d) \sqrt {-\frac {1}{c+d}}}+\frac {2 i \left (-2 b (b c-3 d) (c-d) E\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+d \left (-2 (3+b) (b c-3 d) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )+\left (-18+b^2\right ) d \operatorname {EllipticPi}\left (\frac {b (c+d)}{b c-3 d},i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )\right )\right ) \sec (e+f x) \sqrt {-\frac {d (-1+\sin (e+f x))}{c+d}} \sqrt {-\frac {d (1+\sin (e+f x))}{c-d}}}{b (b c-3 d) d \sqrt {-\frac {1}{c+d}}}-\frac {4 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3+b \sin (e+f x)}+\frac {2 (12 c-b d) \operatorname {EllipticPi}\left (\frac {2 b}{3+b},\frac {1}{4} (-2 e+\pi -2 f x),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(3+b) \sqrt {c+d \sin (e+f x)}}}{4 \left (-9+b^2\right ) f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(871\) vs. \(2(393)=786\).
Time = 6.21 (sec) , antiderivative size = 872, normalized size of antiderivative = 2.95
method | result | size |
default | \(\frac {\sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (\frac {2 d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \Pi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \frac {-\frac {c}{d}+1}{-\frac {c}{d}+\frac {a}{b}}, \sqrt {\frac {c -d}{c +d}}\right )}{b^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {c}{d}+\frac {a}{b}\right )}+\frac {\left (-d a +c b \right ) \left (-\frac {b^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \left (a +b \sin \left (f x +e \right )\right )}-\frac {a d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {b d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \left (\left (-\frac {c}{d}-1\right ) E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )+F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}+\frac {\left (3 a^{2} d -2 a b c -b^{2} d \right ) \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \Pi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \frac {-\frac {c}{d}+1}{-\frac {c}{d}+\frac {a}{b}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) b \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {c}{d}+\frac {a}{b}\right )}\right )}{b}\right )}{\cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(872\) |
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\int { \frac {\sqrt {d \sin \left (f x + e\right ) + c}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\int { \frac {\sqrt {d \sin \left (f x + e\right ) + c}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {c+d \sin (e+f x)}}{(3+b \sin (e+f x))^2} \, dx=\int \frac {\sqrt {c+d\,\sin \left (e+f\,x\right )}}{{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2} \,d x \]
[In]
[Out]